<template>
  <div>
    <el-row>
      <el-rol>收藏夹</el-rol>
    </el-row>
    <div v-for="(item, index) in starList" :key="index" @click="linkToStar(starList[index].id)">
      <span>{{ item.content }}</span>
      <span style="float: right">{{ item.date }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "StarPage",
  data() {
    return {
      starList: [
        {
          content: '软磁',
          date: '2021-12-6'
        }, {
          content: '软磁',
          date: '2021-12-6'
        }, {
          content: '软磁',
          date: '2021-12-6'
        }
      ]
    }
  },
  created() {
    this.getAllStar()
  },
  methods: {
    //获取所有收藏列表
    getAllStar() { },
    //点击某个收藏，页面跳转到样本基本参数页面
    linkToStar(id) {
      window.sessionStorage.setItem('starId', id)
      this.$router.push('')
    }
  },
}
</script>

<style scoped>
</style>